how to use cursor in postgresql

join shbcf.ru